import { RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'layout',
    component: () => import('../views/layout/index.vue'),
    redirect: '/pages/form/button',
    children: [
      { path: '/pages/form/button', name: 'button', component: () => import('@/views/pages/form/button.vue') },
      { path: '/pages/form/input', name: 'input', component: () => import('@/views/pages/form/input.vue') },
      { path: '/pages/info/toast', name: 'toast', component: () => import('@/views/pages/info/toast.vue') },
      { path: '/pages/microapp/:page*', name: 'microapp', component: () => import('@/views/pages/microapp/index.vue') },
      { path: '/pages/404', name: '404', component: () => import('@/views/pages/404.vue') },
    ]
  }
]

export default routes